<?php
//print_r($this->allRestaurants);
?>
<a href="/adminarea/addrestaurant" class="sexybutton sexysimple sexymagenta"><span class="add">Add New Restaurant</span></a><br />


<table width="100%" cellspacing="0" cellpadding="8" class="newsfeed" id="myTable" border="0"  valign="top">
<thead>
	<tr>
		<th>Name</th>
		<th>&nbsp;</th>
	</tr>
</thead>
<tbody>

	<?php
	foreach ($this->allRestaurants as $oItem)
	{
		?>
	<tr id="row_<?php echo $oItem->id; ?>" valign="top">
		<td class="td_top" valign="top">
			<?php if (isset($oItem->image)){?> <img src="<?php echo '/i/restaurants_logo/' . $this->escape($oItem->image); ?>"  /><?php }?>
		</td>

		<td class="td_top" valign="top">
			<b> <?php echo $this->escape($oItem->name); ?></b> <br />
			<?php echo $this->escape($oItem->description); ?>  <br />
			<a class="sexybutton sexysimple sexymagenta" href="/adminarea/editrestaurant/id/<?php echo $oItem->id; ?>"><span class="edit">Edit</span></a>
			<a class="sexybutton sexysimple sexymagenta" href="/adminarea/menuitems/id_restaurant/<?php echo $oItem->id; ?>"><span class="edit">Manage Menu</span></a>
			<a href="/adminarea/reviews/id_restaurant/<?php echo $oItem->id; ?>" class="sexybutton sexysimple sexymagenta">Manage Reviews</a>			
			<span class="del_element"><a class="sexybutton sexysimple sexymagenta delete_res" id="<?php echo $oItem->id; ?>"
				href="javascript: void(0);"><span class="delete">Delete</span></a></span>
		</td>
	</tr>
	<?php
	}
	?>

</tbody>
</table>

	<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>